<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>card detail</title>
	<meta name="decorator" content="default"/>
</head>
<body>
	<tags:breadcrumb name="breadcrumb" />
	<div class="icon-buttons">
		<a id="return" data-role="button" data-icon="back" data-iconpos="notext" data-inline="true" href="#">返回</a>
	</div>
	<form:form id="searchForm" modelAttribute="" action="${ctx}/report/all/cardDetail" method="post" class="middleCls" data-ajax="false">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<input id="cardTmpId" name="cardTmpId" type="hidden" value="${cardTmpId}"/>
		<input id="reportType" name="reportType" type="hidden" value="${reportType}"/>
		<input id="cardType" name="cardType" type="hidden" value="${cardType}"/>
		<input id="startDate" name="startDate" type="hidden" value="${startDate}"/>
		<input id="endDate" name="endDate" type="hidden" value="${endDate}"/>
	</form:form>
	<div class="form-input">
		<h3 class="middleCls">卡信息明细列表</h3>
		<table id="contentTable" data-role="table" class="ui-responsive table-stroke">
			<thead><tr><th>日期</th><th>客户</th><th>员工</th><th>总价</th></tr></thead>
			<tbody>
			<c:forEach items="${page.list}" var="reportCardDetail">
				<tr>
					<td>
						${fns:formatDate(reportCardDetail.storeConsume.consume_Time, "yyyy-MM-dd")}
					</td>
					<td>${reportCardDetail.storeConsume.customer.name}</td>
					<td>${reportCardDetail.employee.name}</td>
					<td>${empty reportCardDetail.real_cost ? '时段卡耗卡' : reportCardDetail.real_cost}</td>
				</tr>
			</c:forEach>
			</tbody>
		</table>
		<div class="pagination">${page}</div>
	</div>
	<script type="text/javascript">
		$(document).ready(function() {
			loadingSortTable("contentTable");
			addParentPageNo();
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		function addParentPageNo() {
			var reportStart = sessionStorage.reportStartSecond;
			var reportEnd = sessionStorage.reportEndSecond;
			var	returnHref = "${ctx}/report/all/card?startDate=" +reportStart + "&endDate=" + reportEnd;
			$("#return").attr("href", returnHref);
		}
	</script>
</body>
</html>
